public class Students {

	private String name;
	private int age;
	private String gender;
	private int schoolClass;

	Students(String n, int a, String g, int c) throws UserFileException{
		try {
			
			this.name=n;

			if (a < 7 || a > 18) {
				throw new UserFileException("Wrong age!");
				}
			this.age=a;
			
			this.gender=g;
			this.schoolClass=c;
			//return;
		}
		catch (IllegalArgumentException e){
			System.out.println("Illegal data");
		}
		finally {
			
		}
	
	}
	
}


